package com.hockeo.shared.rpc.command.error;

import com.hockeo.shared.rpc.command.ICommand;
import com.hockeo.shared.rpc.command.IResponse;

/**
 * Indicates that a command was not handled because no suitable handler was available.
 *
 * @version $Id$
 * @author jjanke
 */
public class MissingExecutorException extends CommandException
{
  private static final long serialVersionUID = 1L;
  private String d_strCommandClassName;

  /** Default argumentless constructor for GWT/RPC */
  private MissingExecutorException()
  {}

  /**
   * Creates a new MissingExecutorException.
   *
   * @param clsCommand the command for which no executor was found
   */
  public MissingExecutorException( Class<? extends ICommand<IResponse>> clsCommand )
  {
    d_strCommandClassName = clsCommand.getName();
  }

  /**
   * Returns the name of the command for which no handler was found.
   */
  public String getCommandClassName()
  {
    return d_strCommandClassName;
  }
}
